package com.csf.create.factory.simple.common;

/**
 * TODO ADD DESCRIPTION
 * Date: 2018/9/6
 * Time: 10:12
 *
 * @author chenshf
 */
public class SenderFactory {

    public Sender produce(String type) {
        if ("mail".equals(type)) {
            return new MailSender();
        } else if ("sms".equals(type)) {
            return new SmsSender();
        } else {
            System.out.println("没有找到该类型：" + type);
            return null;
        }
    }
}
